﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using Box2D.XNA;
using Spinning.Spinning.Unitity;
using Spinning.Spinning.Entity.Particle;

namespace Spinning.Spinning.Entity.Particle
{
    class Enemy : ParticleActor
    {

        public Enemy()
            : base()
        {
            Physic_Type = PhysicType.Enemy;
            ZIndex = Constants.enemy;
        }

        public override void OnCreatBody(World world, PhysicConnectManager connectManager)
        {
            base.OnCreatBody(world, connectManager);
            Filter filter = new Filter();
            filter.categoryBits = (ushort)Constants.CategoryBitsEnemy;
            filter.maskBits = (ushort)Constants.MaskBitsEnemy;
            Filter = filter;
            _fixture.SetRestitution(2);
            _fixture.SetDensity(Constants.enemyDensity);
        }
    }
}
